	mui.init({
		preloadPages: [
			{
				url: 'list.html',
				id: 'list.html'
			}
		],
		
		pullRefresh: {
			container: "#app",
			
			down: {
				 style: 'circle',
				 callback :pullfreshdown
			},
			
			up: {
				callback :pullfreshup
			}
		} 
	})
	
	function pullfreshdown() {
		console.log(3333);
		mui('#app').pullRefresh().endPulldown();
	}
	
	function pullfreshup() {
		console.log(4444)
		mui('#app').pullRefresh().endPullup();
	}
	
	mui.plusReady(function () {
		console.log('加载完成');
		
		mui('.mui-table-view').on('click', '.mui-table-view-cell', function () {
			var infoDetail = this.getAttribute('info');
			var picDetail = this.getAttribute('pic');
			mui.openWindow({
				url: 'detail.html',
				id: 'detail.html',
				styles: {
					top: '0px',
					bottom: '50px'
				},
				extras: {
					info: infoDetail,
					pic: picDetail
				}
			})
		})
	})
	
	//实例化Vue
	var vm = new Vue({
		el: '#app',
		data: {
			list: {}
		},
		
		methods: {
			getList: function() {
				var that = this;
				mui.get('http://route.showapi.com/126-2', {
					showapi_appid: 79094,
					showapi_sign: '5998dfbc758147bf992e02edb43e34db'
				},function(result) {
					if(result.showapi_res_code === 0){
						that.list = result.showapi_res_body.pagebean.contentlist
						
					}else {
						mui.toast(result.showapi_res_error);
					}
				})
			}
		},
		
		created: function () {
			console.log("加载列表成功")
			this.getList(); 
			console.log("加载列表完成")
		}
		
	})